package com.hhkj.study.admin.config.model.req;

import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.json.JSONUtil;
import com.hhkj.study.admin.config.model.podo.ConfigBaseDo;
import lombok.Data;

import lombok.EqualsAndHashCode;

import java.util.List;

/**
*
* @author SERVER
* @since 2024-09-06
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class ConfigBaseReq extends ConfigBaseDo {

    /**
     * 区域id列表
     */
    private List<Long> provinceIdList;

    @Override
    public String getProvinceIds() {
        if (CollectionUtil.isNotEmpty(this.getProvinceIdList())) {
            return JSONUtil.toJsonStr(getProvinceIdList());
        }
        return super.getProvinceIds();
    }
}